#ifndef _TASKQUEUE_H
#define _TASKQUEUE_H

#include <iostream>                                    
#include <mutex>
#include <queue>
#include <condition_variable>

using std::queue;
using std::mutex;
using std::condition_variable;

class TaskQueue
{
private:
    size_t _capacity;
    queue<int> _que;
    mutex _mutex;
    condition_variable _notEmpty;
    condition_variable _notFull;

public:
    TaskQueue(size_t capacity);
    ~TaskQueue();
    void TaskPush(const int& value);
    int TaskPop();
    bool empty();
    bool full();

};

#endif
